import 'controller/controller.dart';
import 'utils/original_utils.dart';

class WebViewDelegate {
  final WebViewGroupOptions options = WebViewGroupOptions();

  void onWebViewCreated(HtmlController controller) {}

  bool shouldOverrideUrlLoading(String url) => true;

  void onPageStarted(String src) {}

  void onProgressChanged(int progress) {}

  void onTitleChanged(String title) {}

  /// Callback for when the page has finished loading (i.e. is shown on screen).
  void onPageFinished(String src) {}

  /// Callback for when something goes wrong in while page or resources load.
  void onWebResourceError(WebResourceError error) {}

  String get customUserAgent => '';

  Map<String, String> get headers => const {};
}

class WebViewGroupOptions {
  ///是否支持缩放
  bool supportZoom = false;
}
